# 断言的封装
# util: 工具类

class AssertUtil:
    # 封装tpshop 断言方法
    @classmethod
    def assert_common(cls,resp,status_code,status,msg):
        assert status_code == resp.status_code
        assert status == resp.json()["status"]
        assert msg == resp.json()["msg"]

    # 封装ihrm 断言方法
    @classmethod
    def assert_common_ihrm(cls,resp,status_code,success,code,message):
        # 断言 预期结果 = 实际结果
        assert status_code == resp.status_code
        assert success == resp.json().get("success")
        assert code == resp.json().get("code")
        assert message == resp.json().get("message")

